From 5a9ab7acc110354afeb360f5196ba2497b03345c Mon Sep 17 00:00:00 2001 From: "emellor@ewan" Date: Tue, 20 Sep 2005 17:29:57 +0100 Subject: [PATCH] domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The underlying xc_domain_setmaxmem already took an unsigned int, and PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way that longer values would get through here in any case. Fixing the documentation and the local variable is the best solution, until someone decides that we need to support maxmem values greater than 2TiB. Signed-off-by: Ewan Mellor --- tools/python/xen/lowlevel/xc/xc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index c7c09efbc1..d7452fabd1 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -847,7 +847,7 @@ static PyObject *pyxc_domain_setmaxmem(PyObject *self, XcObject *xc = (XcObject *)self; u32 dom; - unsigned long maxmem_kb; + unsigned int maxmem_kb; static char *kwd_list[] = { "dom", "maxmem_kb", NULL }; @@ -1178,7 +1178,7 @@ static PyMethodDef pyxc_methods[] = { METH_VARARGS | METH_KEYWORDS, "\n" "Set a domain's memory limit\n" " dom [int]: Identifier of domain.\n" - " maxmem_kb [long]: .\n" + " maxmem_kb [int]: .\n" "Returns: [int] 0 on success; -1 on error.\n" }, { "domain_memory_increase_reservation", -- 2.30.2